﻿@model Sharp.DataTransferObject.Workflow.ProcessDTO
@{
    Layout = null;
    var res = Html.X().ResourceManager().AjaxTimeout(3000000).Locale("zh-CN");


    res.Theme(Theme.Neptune);

}

<!DOCTYPE html>

<html>
<head>
    <title>Slickflow Designer</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <link rel="stylesheet" href="~/Content/bootstrap/bootstrap-3.3.7.min.css" />
    <link rel="stylesheet" href="~/Content/bootstrap/bootstrap-theme-3.3.7.min.css" />
    <link rel="stylesheet" href="~/Content/bootstrap/bootstrap-dialog.min.css" />
    <link rel="stylesheet" href="~/Content/bootstrap/bootstrap-progressbar-3.3.4.min.css" />

    <link rel="stylesheet" href="~/Content/ag-grid/ag-grid.css" />
    <link rel="stylesheet" href="~/Content/ag-grid/theme-bootstrap.css" />

    <link rel="stylesheet" href="~/Content/graphCanvas.css" />
    <link rel="stylesheet" href="~/Content/msgBoxLight.css" />

    <style type="text/css" media="screen">
        div.base {
            position: absolute;
            overflow: hidden;
            font-family: Arial;
            font-size: 8pt;
        }

            div.base#graph {
                border-style: solid;
                border-color: #F2F2F2;
                border-width: 1px;
                background: url('/Scripts/mxgraph/images/grid.gif');
            }

        hr {
            border-top: 1px solid #000000 !important;
            margin-bottom: 5px !important;
            margin-top: 5px !important;
        }
    </style>

    <script>
        mxBasePath = '/Scripts/mxgraph/';
        imageBasePath = '/Scripts/mxgraph/';
    </script>


    @Scripts.Render("~/bundles/lib")

</head>
<body>
    @res

    <div id="graph" class="base">
        <!-- Graph Here -->
    </div>
    <div id="status" class="base" align="right" style="white-space:nowrap;">
        <!-- Status Here -->
    </div>

    <!--Progress Bar-->
    <div class="modal js-loading-bar">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-body">
                    <div class="progress">
                        <div class="progress-bar" role="progressbar" data-transitiongoal="75"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- jquery -->
    <script src="~/Scripts/jquery/jquery.msgBox.js"></script>

    <script src="~/Scripts/bootstrap/bootstrap.min.js"></script>
    <script src="~/Scripts/bootstrap/bootstrap-dialog.min.js"></script>
    <script src="~/Scripts/bootstrap/bootstrap-progressbar.min.js"></script>

    <!-- ag-grid-->
    <script src="~/Scripts/ag-grid/ag-grid.min.js"></script>

    <!--helper-->
    <script src="~/Scripts/slick.event.js"></script>
    <script src="~/Scripts/jshelper.js"></script>
    <script src="~/Scripts/xmlhelper.js"></script>
    <script src="~/Scripts/vkbeautify.js"></script>
    <script src="~/Scripts/XMLWriter-1.0.0-min.js"></script>

    <script src="~/Scripts/mxgraph/js/mxClient.js"></script>

    <!-- Slickflow kgraph main files -->
    <script src="~/ViewJS/mxfile.js"></script>
    <script src="~/ViewJS/kloader.js"></script>
    <script src="~/ViewJS/kmain.js"></script>
    <script src="~/ViewJS/kmodel.js"></script>
    <script src="~/ViewJS/mxtoolkit.js"></script>
    <script src="~/ViewJS/mxconfig.js"></script>
    <script src="~/ViewJS/processlist.js"></script>
    <script src="~/ViewJS/activityproperty.js"></script>
    <script src="~/ViewJS/transitionproperty.js"></script>
    <script src="~/ViewJS/gatewayproperty.js"></script>
    <script src="~/ViewJS/subprocessmanager.js"></script>
    <script src="~/ViewJS/rolelist.js"></script>

    <script>
        mxGraph.prototype.htmlLabels = true;
        mxGraph.prototype.allowLoops = true;

        mxGraph.prototype.isWrapping = function (cell) {
            return true;
        };

        mxConstants.DEFAULT_HOTSPOT = 1;

        // Enables guides
        mxGraphHandler.prototype.guidesEnabled = true;

        // Alt disables guides
        mxGuide.prototype.isEnabledForEvent = function (evt) {
            return !mxEvent.isAltDown(evt);
        };

        // Enables snapping waypoints to terminals
        mxEdgeHandler.prototype.snapToTerminals = true;

        //window.onbeforeunload = function () { return mxResources.get('changesLost'); };
    </script>
    <script>
    var processID = '@Model.Id';
    $(function () {
        kmain.init();
        kmain.initializeMxGraphEditor();

        if (processID !== '') {
            processlist.openProcessDiagram(processID);
        }
    });
    </script>

</body>
</html>
